From: Brion Vibber Date: Thu, 19 Jan 2006 06:29:41 +0000 (+0000) Subject: use wfRegexReplacement() which was added a little while ago to cover this silly regex... X-Git-Tag: 1.6.0~480 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=3dd56202e1a167879aede87a0e65ae08ffebb792;p=lhc%2Fweb%2Fwiklou.git use wfRegexReplacement() which was added a little while ago to cover this silly regex case --- diff --git a/includes/Linker.php b/includes/Linker.php index 9ac52a2ab6..ab962091a2 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -732,9 +732,7 @@ class Linker { $match[1] = substr($match[1], 1); $thelink = $this->makeLink( $match[1], $text, "", $trail ); } - # Quote backreferences, then run preg_replace - $thelink = strtr( $thelink, array( "\\" => "\\\\", '$' => "\\$" ) ); - $comment = preg_replace( $linkRegexp, $thelink, $comment, 1 ); + $comment = preg_replace( $linkRegexp, wfRegexReplacement( $thelink ), $comment, 1 ); } wfProfileOut( $fname ); return $comment;